package cn.kgc.smbms.utils;

import java.util.List;

public class Page<T> {
    private int pageNo;
    private int pageSize;

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalRecode() {
        return totalRecode;
    }

    public void setTotalRecode(int totalRecode) {
        this.totalRecode = totalRecode;
    }

    public Page() {
    }

    public Page(int pageNo, int pageSize, int totalRecode) {
        this.pageNo = pageNo;
        this.pageSize = pageSize;
        this.totalRecode = totalRecode;
    }

    private int totalRecode;
    public int getTotalPage(){
        int totalPage=0;
        if (totalRecode%pageSize==0){
            totalPage=totalRecode/pageSize;
        }else {
            totalPage=totalRecode/pageSize+1;
        }
        return totalPage;
    }
}
